package com.glasses.primework;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

@ManagedBean
public class GrowlBean {
    public void doSomething() {
        System.out.println("GrowlBean.doSomething() triggered!");
        
        FacesContext context = FacesContext.getCurrentInstance().getCurrentInstance();
        context.addMessage("somekey", new FacesMessage("Message One"));
        context.addMessage("somekey", new FacesMessage("Message Two"));
        context.addMessage("anotherkey", new FacesMessage("Message Three"));
    }
}
